package factory.simplefactory.pizzastore.order;

import com.sun.corba.se.impl.orbutil.ObjectUtility;
import factory.simplefactory.pizzastore.factory.PizzaFactory;
import factory.simplefactory.pizzastore.pizza.Pizza;

/**
 *  订购披萨
 */
public class OrderPizza {
    public void order(String pizzaType){
        Pizza pizza = PizzaFactory.createPizza(pizzaType);
        if(pizza==null){
            System.out.println("没有"+pizzaType);
        }else {
            pizza.prepare();
            pizza.bake();
            pizza.cut();
            pizza.box();
        }
    }
}
